<%@ Page Language="C#" MasterPageFile="~/MasterPageMcSig.master" AutoEventWireup="true"
    CodeFile="IndicadoresListado.aspx.cs" Inherits="IndicadoresListado" %>

<%@ Register Src="Fechas.ascx" TagName="Fechas" TagPrefix="uc1" %>
<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="indicadores">
        Indicadores</h1>
    <table class="content-box1" style="width: 100%">
        <tr>
            <td style="width: 150px">
                <h3>
                    &nbsp;Escoja un indicador</h3>
            </td>
            <td class="angulo">
                &nbsp;</td>
            <td class="gris">
                <asp:Menu ID="MenuIndicadores" runat="server" DynamicHorizontalOffset="0" MaximumDynamicDisplayLevels="2"
                    CssClass="menuind" Orientation="Horizontal">
                    <StaticMenuStyle />
                    <StaticMenuItemStyle HorizontalPadding="0px" VerticalPadding="5px" />
                    <DynamicHoverStyle BackColor="white" />
                    <DynamicMenuStyle CssClass="menuindopcion" />
                    <DynamicSelectedStyle BackColor="white" />
                    <DynamicMenuItemStyle />
                    <StaticHoverStyle />
                    <StaticItemTemplate>
                        <%# Eval("Text") %>
                    </StaticItemTemplate>
                    <StaticSelectedStyle BackColor="#FFCC66" />
                </asp:Menu>
            </td>
        </tr>
    </table>
    <dxwgv:ASPxGridView ID="gidvMetadatos" runat="server" AutoGenerateColumns="False"
        KeyFieldName="IME_ID" Width="100%" OnRowCommand="gidvMetadatos_RowCommand">
        <Columns>
            <dxwgv:GridViewDataTextColumn FieldName="IME_ID" VisibleIndex="0" Caption="ID" Visible="False">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IME_NOMBRE" Caption="Nombre del Indicador"
                VisibleIndex="0">
                <DataItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <asp:LinkButton ID="lnkEjecucion" runat="server" AutoUpdateAfterCallBack="True" CommandName="cmdDibujaGrafico"
                                    Text='<%#Eval("IME_NOMBRE")%>'></asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                </DataItemTemplate>
                <CellStyle Wrap="True">
                </CellStyle>
            </dxwgv:GridViewDataTextColumn>
        </Columns>
    </dxwgv:ASPxGridView>
    <dxwgv:ASPxGridView ID="ASPxGridViewDatosMetadato" runat="server" AutoGenerateColumns="False"
        CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue"
        KeyFieldName="MET_ID" OnRowCommand="gidvMetadatos_RowCommand" Width="100%">
        <SettingsPager ShowDefaultImages="False">
            <AllButton Text="All">
            </AllButton>
            <NextPageButton Text="Siguiente &gt;">
            </NextPageButton>
            <PrevPageButton Text="&lt; Anterior">
            </PrevPageButton>
        </SettingsPager>
        <Images ImageFolder="~/App_Themes/Plastic Blue/{0}/">
            <CollapsedButton Height="10px" Url="~/App_Themes/Plastic Blue/GridView/gvCollapsedButton.png"
                Width="9px" />
            <ExpandedButton Height="9px" Url="~/App_Themes/Plastic Blue/GridView/gvExpandedButton.png"
                Width="9px" />
            <HeaderSortDown Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortDown.png"
                Width="11px" />
            <HeaderSortUp Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortUp.png"
                Width="11px" />
        </Images>
        <Styles CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue">
            <Header ImageSpacing="10px" SortingImageSpacing="10px">
            </Header>
        </Styles>
        <Columns>
            <dxwgv:GridViewDataTextColumn Caption="ID" FieldName="IME_ID" Visible="False" VisibleIndex="0">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Nombre del Indicador" FieldName="IME_NOMBRE"
                Visible="False" VisibleIndex="0">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Descripci&#243;n" FieldName="IME_DESCRIPCION"
                VisibleIndex="0" Width="400px">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Variables" FieldName="IME_VARIABLE" VisibleIndex="1">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Formula C&#225;lculo" FieldName="IME_FORMULA_CALCULO"
                VisibleIndex="2">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Periodicidad" FieldName="IME_PERIODICIDAD"
                VisibleIndex="3">
            </dxwgv:GridViewDataTextColumn>
        </Columns>
    </dxwgv:ASPxGridView>
    <div>
        <table width="100%">
            <tr>
                <td style="width: 20%; vertical-align: top">
                    <table width="100%" class="content-box1 padding">
                        <tr>
                            <td>
                                <div class="subtitulo">
                                    Fecha Inicial</div>
                                <uc1:Fechas ID="FechaInicial" runat="server" GrupoValidacion="fechas" OnLoad="Fechas1_Load" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="subtitulo">
                                    Fecha Final</div>
                                <uc1:Fechas ID="FechaFinal" runat="server" GrupoValidacion="fechas" />
                            </td>
                        </tr>
                        <tr>
                            <td align="center">
                                <asp:Button ID="btnFiltrar" runat="server" CssClass="button s" OnClick="btnFiltrar_Click"
                                    Text="Filtrar Fechas" ValidationGroup="fechas" /></td>
                        </tr>
                        <tr>
                            <td class="line">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="subtitulo">Periodos</span>
                                <asp:DropDownList ID="ddlPeriodos" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPeriodos_SelectedIndexChanged">
                                    <asp:ListItem>Anual</asp:ListItem>
                                    <asp:ListItem>Mensual</asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td class="line">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="subtitulo">Acumular Valores</span>
                                <asp:RadioButtonList ID="rblAcumula" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rblAcumula_SelectedIndexChanged"
                                    RepeatDirection="Horizontal">
                                    <asp:ListItem Selected="True" Value="S">Si</asp:ListItem>
                                    <asp:ListItem Value="N">No</asp:ListItem>
                                </asp:RadioButtonList></td>
                        </tr>
                    </table>
                    <div class="subtitulo bt-space10">
                        Tabla Resumen Anual</div>
                    <dxwgv:ASPxGridView ID="ASPxGridViewResumen" runat="server" AutoGenerateColumns="False"
                        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue"
                        OnRowCommand="gidvMetadatos_RowCommand" Width="100%">
                        <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue">
                            <Header ImageSpacing="10px" SortingImageSpacing="10px">
                            </Header>
                          
                        </Styles>
                        <SettingsPager ShowDefaultImages="False">
                            <AllButton Text="All">
                            </AllButton>
                            <NextPageButton Text="Next &gt;">
                            </NextPageButton>
                            <PrevPageButton Text="&lt; Prev">
                            </PrevPageButton>
                        </SettingsPager>
                        <Images SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/PlasticBlue/GridView/gvLoadingOnStatusBar.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/PlasticBlue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <Columns>
                            <dxwgv:GridViewDataTextColumn Caption="a&#241;o" FieldName="ANO" VisibleIndex="0">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Meta" FieldName="MET_CANTIDAD" VisibleIndex="1">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Resultado" FieldName="AVANCES_ANO" VisibleIndex="2">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Avance" FieldName="PORCENTAJE" VisibleIndex="3">
                                <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                </PropertiesTextEdit>
                            </dxwgv:GridViewDataTextColumn>
                        </Columns>
                        <TotalSummary>
                            <dxwgv:ASPxSummaryItem FieldName="MET_CANTIDAD" SummaryType="Sum" ShowInColumn="MET_CANTIDAD" />
                            <dxwgv:ASPxSummaryItem FieldName="AVANCES_ANO" SummaryType="Sum" ShowInColumn="AVANCES_ANO" />
                        </TotalSummary>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <StylesEditors>
                            <ProgressBar Height="25px">
                            </ProgressBar>
                            <CalendarHeader Spacing="11px">
                            </CalendarHeader>
                        </StylesEditors>
                        <Settings ShowFooter="True" />
                    </dxwgv:ASPxGridView>
                </td>
                <td style="width: 15px">
                    &nbsp;</td>
                <td style="vertical-align: top">
                    <table width="100%">
                        <tr>
                            <td style="width: 80%; vertical-align: top">
                                <iframe width="100%" height="350" runat="server" id="iframetemp" frameborder="0"
                                    style="border: 1px solid #ccc; margin-right: 10px; margin-top: 10px">If you can
                                    see this, your browser doesn't understand IFRAME. However, we'll still ojo manual
                                    http://code.google.com/intl/es-ES/apis/chart/types.html#pie_charts <a href="hello.html">
                                        link</a> you to the file. </iframe>
                            </td>
                            <td>
                                &nbsp;</td>
                            <td style="width: 18%; vertical-align: top" valign="top">
                                <div class="subtitulo tp-space20 bt-space10">
                                    Opciones Grafico</div>
                                <div class="small tp-space20">
                                    <strong>Ancho Grafico</strong></div>
                                <asp:RadioButtonList ID="rbtAnchoColumnas" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
                                    RepeatDirection="Horizontal" Font-Size="Smaller">
                                    <asp:ListItem Value="0.5">100%</asp:ListItem>
                                    <asp:ListItem Selected="True" Value="1.5">50%</asp:ListItem>
                                    <asp:ListItem Value="7.5">10%</asp:ListItem>
                                </asp:RadioButtonList>
                                <div class="small tp-space20">
                                    <strong>Alto Grafico</strong></div>
                                <asp:RadioButtonList ID="rblAlto" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
                                    RepeatDirection="Horizontal" Font-Size="Smaller">
                                    <asp:ListItem Value="1">100%</asp:ListItem>
                                    <asp:ListItem Value="20" Selected="True">80%</asp:ListItem>
                                    <asp:ListItem Value="40">60%</asp:ListItem>
                                </asp:RadioButtonList>
                                <div class="small tp-space20">
                                    <strong>Tipo Grafico</strong></div>
                                <asp:DropDownList ID="ddlTipoGrafico" runat="server" OnSelectedIndexChanged="ddlTipoGrafico_SelectedIndexChanged"
                                    AutoPostBack="True" Font-Size="Smaller">
                                    <asp:ListItem Value="bvg">Barras Vertical </asp:ListItem>
                                    <asp:ListItem Value="bvs">Barras Vertical Apiladas</asp:ListItem>
                                    <asp:ListItem Value="bhs">Barras Horizontal Apiladas</asp:ListItem>
                                    <asp:ListItem Value="bhg">Barras Horizontal</asp:ListItem>
                                    <asp:ListItem Value="lc">Lineas</asp:ListItem>
                                    <asp:ListItem Value="pc">Pastel</asp:ListItem>
                                    <asp:ListItem Value="r">Radial</asp:ListItem>
                                </asp:DropDownList><br />
                                <div class="small tp-space20">
                                    <strong>Colores</strong></div>
                                <asp:DropDownList ID="ddlColores" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlColores_SelectedIndexChanged"
                                    Font-Size="Smaller">
                                    <asp:ListItem Value="3CB371,FFD700">Verde-Oro </asp:ListItem>
                                    <asp:ListItem Value="4D89F9,C6D9FD">Azul-Azul</asp:ListItem>
                                    <asp:ListItem Value="4D89F9,FFD700">Azul-Oro </asp:ListItem>
                                    <asp:ListItem Value="4D89F9,3CB371">Azul-Verde </asp:ListItem>
                                    <asp:ListItem Value="4D89F9,FFA07A">Azul-Rojo</asp:ListItem>
                                    <asp:ListItem Value="FFA07A,FF0000">Rojo-Rojo</asp:ListItem>
                                    <asp:ListItem Value="CD5C5C,C6D9FD">Rojo-Azul </asp:ListItem>
                                    <asp:ListItem Value="CD5C5C,FFD700">Rojo-Oro </asp:ListItem>
                                    <asp:ListItem Value="CD5C5C,3CB371">Rojo-Verde </asp:ListItem>
                                    <asp:ListItem Value="FFD700,F0E68C">Oro-Oro </asp:ListItem>
                                    <asp:ListItem Value="FFD700,C6D9FD">Oro-Azul </asp:ListItem>
                                    <asp:ListItem Value="FFD700,FFA07A">Oro-Rojo </asp:ListItem>
                                    <asp:ListItem Value="FFD700,3CB371">Oro-Verde </asp:ListItem>
                                    <asp:ListItem Value="3CB371,9ACD32">Verde-Verde </asp:ListItem>
                                    <asp:ListItem Value="3CB371,C6D9FD">Verde-Azul </asp:ListItem>
                                    <asp:ListItem Value="3CB371,FFA07A">Verde-Rojo </asp:ListItem>
                                </asp:DropDownList>
                                <br />
                                <div class="small tp-space20">
                                    <strong>Fondo</strong></div>
                                <asp:DropDownList ID="ddlFondo" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlFondo_SelectedIndexChanged"
                                    Font-Size="Smaller">
                                    <asp:ListItem Value="chf=c,lg,90,76A4FB,0.9,FFFFFF,0|bg,s,EFEFEF">Azul</asp:ListItem>
                                    <asp:ListItem Value="chf=c,lg,90,deb887,0.5,FfFFFf,0|bg,s,FAEBD7">Cafe</asp:ListItem>
                                    <asp:ListItem Value="chf=c,lg,90,C0C0C0,0.5,FfFFFf,0|bg,s,dcdcdc">Gris</asp:ListItem>
                                    <asp:ListItem Value="chf=c,lg,90,F0E68C,0.5,FfFFFf,0|bg,s,Ffffe0">Amarillo</asp:ListItem>
                                    <asp:ListItem Value="chf=c,lg,90,8fbc8f,0.5,FfFFFf,0|bg,s,Ffffe0">Verde</asp:ListItem>
                                    <asp:ListItem>Sin Fondo</asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                    </table>
                    <br />
                    &nbsp;<dxwgv:ASPxGridView ID="ASPxGridViewDetalle" runat="server" AutoGenerateColumns="False"
                        CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue"
                        KeyFieldName="MET_ID" OnRowCommand="gidvMetadatos_RowCommand" Width="100%">
                        <SettingsPager ShowDefaultImages="False">
                            <AllButton Text="All">
                            </AllButton>
                            <NextPageButton Text="Siguiente &gt;">
                            </NextPageButton>
                            <PrevPageButton Text="&lt; Anterior">
                            </PrevPageButton>
                        </SettingsPager>
                        <Images ImageFolder="~/App_Themes/Plastic Blue/{0}/">
                            <CollapsedButton Height="10px" Url="~/App_Themes/Plastic Blue/GridView/gvCollapsedButton.png"
                                Width="9px" />
                            <ExpandedButton Height="9px" Url="~/App_Themes/Plastic Blue/GridView/gvExpandedButton.png"
                                Width="9px" />
                            <HeaderSortDown Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortDown.png"
                                Width="11px" />
                            <HeaderSortUp Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortUp.png"
                                Width="11px" />
                        </Images>
                        <Styles CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue">
                            <Header ImageSpacing="10px" SortingImageSpacing="10px">
                            </Header>
                        </Styles>
                        <Columns>
                            <dxwgv:GridViewDataTextColumn Caption="ID" FieldName="MET_ID" Visible="False" VisibleIndex="0">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Meta" FieldName="MET_NOMBRE" VisibleIndex="0">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Valor Meta" FieldName="MET_CANTIDAD" VisibleIndex="1">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Avance" FieldName="AAM_AVANCE_VALOR" VisibleIndex="2">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Fecha Avance" FieldName="AAM_FECHA" VisibleIndex="3">
                                <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                                </PropertiesTextEdit>
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Variable" FieldName="IME_VARIABLE" Visible="False"
                                VisibleIndex="0">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Unidad de Medida" FieldName="MET_UNIDAD_MEDIDA"
                                VisibleIndex="4">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Fecha Meta" FieldName="MET_FECHA" VisibleIndex="5">
                                <PropertiesTextEdit DisplayFormatString="dd/MM/yyyy">
                                </PropertiesTextEdit>
                            </dxwgv:GridViewDataTextColumn>
                        </Columns>
                    </dxwgv:ASPxGridView>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
